package com.pfzy.krakenapp

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;

import com.openkraken.kraken.Kraken;

class MainActivity : FlutterActivity() {
    protected override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val engine: FlutterEngine = getFlutterEngine() ?: return
        val kraken = Kraken(engine)
        val url =
            "https://raw.githubusercontent.com/openkraken/kraken/main/kraken/example/assets/bundle.js"
        kraken.loadUrl(url)
    }
}

//class MainActivity : AppCompatActivity() {
//    override fun onCreate(savedInstanceState: Bundle?) {
//        super.onCreate(savedInstanceState)
//        setContentView(R.layout.activity_main)
//    }
//}